Repository navigation
feat: standalone vectorized PDF dossier report export and viewer endpoints - #2713
Merged
Merged
Conversation
- Declare /Encoding /WinAnsiEncoding on the four fonts and encode the page streams as cp1252. Without it viewers use StandardEncoding and draw accented letters as the wrong glyph (é as Ø, è as Ł, ñ as æ). - Reduce text to what WinAnsi can show: accents it lacks fall back to the base letter (ś -> s, ł -> l), other scripts and emoji become one "?" per run, and zero-width characters are dropped. - Wrap long values (e.g. a biography) over up to 6 lines instead of cutting them at 85 characters, and truncate table cells by measured width. - Truncate before escaping: cutting an escaped string could leave a lone backslash that swallowed the closing parenthesis. - Ignore non-object items and out-of-range timestamps in the dossier data, and validate POST /api/export/pdf (422 for non-object cards/results, 400 for an invalid saved_at) instead of returning a 500. - Document the font limits in doc/web-ui.md; add tests for all of the above.
Datalux
force-pushed
the
feat/dossier-pdf-export
branch
from
October 29, 2026 15:19
914e074 to
07216c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a standalone, zero-dependency PDF generator and export pipeline for investigation dossiers in Osintgram.
Key Capabilities
src/pdf_report.py):Page X of Y).GET /api/dossier/{target}/{dossier_id}/pdf: Direct download of saved dossiers as formatted PDF documents.POST /api/export/pdf: Instant export of current live search results to PDF.Report (PDF)action in the File menu.PDFdownload button in the Saved Dossiers table rows.tests/test_pdf_report.py(100% pass).doc/web-ui.md.